Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBG-2877 allow options to contain db-scoped CORS #6205

Merged
merged 2 commits into from
Apr 24, 2023
Merged

Conversation

torcolvin
Copy link
Collaborator

This allows DB scoped methods to have CORS information.

I considered better ways to solve this with CORS middleware like https://github.com/go-chi/cors (there's a gorilla mux version, but gorilla mux is dead).

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Integration Tests

@adamcfraser adamcfraser merged commit 6abfd62 into master Apr 24, 2023
@adamcfraser adamcfraser deleted the CBG-2877 branch April 24, 2023 23:18
torcolvin added a commit that referenced this pull request May 31, 2023
* CBG-2877 allow options to contain db-scoped CORS

* Use pathVars from router.Match to determine keyspace

---------

Co-authored-by: adamcfraser <adam.fraser@couchbase.com>
adamcfraser added a commit that referenced this pull request May 31, 2023
… DB basis (#6277)

* CBG-2807: Allow databases to override CORS config (#6179)

* Don't set db headers unless we auth to DB
* Disallow setting max_age on database

* CBG-2877 allow options to contain db-scoped CORS (#6205)

* CBG-2877 allow options to contain db-scoped CORS

* Use pathVars from router.Match to determine keyspace

---------

Co-authored-by: adamcfraser <adam.fraser@couchbase.com>

---------

Co-authored-by: adamcfraser <adam.fraser@couchbase.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants